#include "Metgine/Core/FontResource.hpp"

namespace Metgine
{
namespace Core
{

FontResource::FontResource(const std::string& path, unsigned int size) :
    Resource(ResourceType::Font)
{
    if (!m_font.LoadFromFile(path, size))
    {
        // If it can't load the font fall back on the SFML default
        m_font = sf::Font::GetDefaultFont();
    }
}

const sf::Font& FontResource::GetFont()
{
    return m_font;
}

}; // Core
}; // Metgine
